<div class="content-wrapper">
    <section class="content-header">
        <h1>
            被拒客户
            <if condition="$department_id gt 0">
                <small>【{$department_name}】</small>
            </if>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/admin"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">客户管理</li>
            <li class="active">被拒客户</li>
        </ol>
    </section>
    <section class="content">
        <div class="box">
            <div class="box-header with-border">
            </div>
            <div class="box-body">
                <table class="table table-bordered">
                    <tbody>
                    <tr>
                        <th style="width: 40px">ID</th>
                        <th>公司名称</th>
                        <th>客户姓名</th>
                        <th>客户手机号</th>
                        <th>推广产品</th>
                        <th>一级分类</th>
                        <th>二级分类</th>
                        <th>类别</th>
                        <th>级别</th>
                        <th>录入人</th>
                        <th>状态</th>
                        <th>阶段</th>
                        <th>创建时间</th>
                    </tr>
                    <if condition="count($customerList) eq 0"><tr><td class="text-center" colspan="12">暂无数据...</td></tr></if>
                    <foreach name="customerList" item="customer">
                            <tr>
                                <td>{$customer.id}</td>
                                <td>{$customer.company_name}</td>
                                <td>{$customer.name}</td>
                                <td>{$customer.mobile}</td>
                                <td>{$customer.product_name}</td>
                                <td>{$customer.first_name}</td>
                                <td>{$customer.second_name}</td>
                                <td>{$customer.type_desc}</td>
                                <td>{$customer.level_desc}</td>
                                <td>{$customer.admin_name}</td>
                                <td>
                                    <if condition="$customer.status eq 1">
                                            <span class="label label-success">{$customer.status_desc}</span>
                                        <elseif condition="$customer.status eq 5" />
                                            <span class="label label-danger refuse-detail" data-detail="{$customer.refuse_reason}" onclick="show_reason(this)">{$customer.status_desc}</span>
                                        <elseif condition="$customer.status eq 10" />
                                            <span class="label label-warning">{$customer.status_desc}</span>
                                        <else />
                                            <span class="label label-primary">{$customer.status_desc}</span>
                                    </if>
                                </td>
                                <td>{$customer.phase_desc}</td>
                                <td>{$customer.create_time}</td>
                            </tr>
                        </foreach>
                    </tbody>
                </table>
            </div>
            <div class="box-footer clearfix">{$page_html}</div>
        </div>
    </section>
</div>
<script src="__PUBLIC__/AdminLTE/plugins/layer/layer.js"></script>
<script type="text/javascript">
    function show_reason(obj) {
        var reason = $(obj).attr('data-detail');
        if(!reason){
           reason = "无拒绝原因";
        }
        layer.alert(reason, {
            skin: 'layui-layer-lan'
            ,closeBtn: 0
            ,anim: 4 //动画类型
        });
    };
</script>